package com.example.wangfanwangluo.wangfanboss;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.WindowManager;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class KucunActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_kucun);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        ActionBar actionbar = getSupportActionBar();
        if (actionbar != null){
            actionbar.hide();
        }
        //数据
        initviews();
        //进入下级页面
        pushAction();
        //返回按钮
        backAction();

    }

    public void initviews(){



    }

    public void pushAction() {
        RelativeLayout layout = (RelativeLayout)findViewById(R.id.kucun_jinri);
        layout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(KucunActivity.this, KucunDetailActivity.class);
                intent.putExtra("title","今日库存");
                startActivity(intent);
            }
        });
        RelativeLayout layout2 = (RelativeLayout)findViewById(R.id.kaidan_jinri);
        layout2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(KucunActivity.this, KucunDetailActivity.class);
                intent.putExtra("title","今日开单");
                startActivity(intent);
            }
        });
        RelativeLayout layout3 = (RelativeLayout)findViewById(R.id.kucun_zhiqian);
        layout3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(KucunActivity.this, KucunDetailActivity.class);
                intent.putExtra("title","之前库存");
                startActivity(intent);
            }
        });
        RelativeLayout layout4 = (RelativeLayout)findViewById(R.id.peizai_jinri);
        layout4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(KucunActivity.this, KucunDetailActivity.class);
                intent.putExtra("title","今日配载");
                startActivity(intent);
            }
        });
    }


    public void backAction(){
        TextView textView = (TextView)findViewById(R.id.exitbtn_kucun);
        textView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
}
